<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>vue</title>
    <script src='https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js'></script>
</head>

<body>
    <div id='app'>
        <navbar>
            <span>商品列表</span>
            <button slot="right">按钮</button>
        </navbar>
        <br>
        <navbar>
            <span>购物车</span>
            <i class="iconfont icon-all" slot="right">图标</i>
        </navbar>
    </div>
</body>
<script>
    // 导航 https://vant-ui.github.io/vant/#/zh-CN/nav-bar
    Vue.component('navbar', {
        template: `
        <div>
            <button>返回</button>
            <slot><slot>
            <slot name="right"></slot>
        </div>
    `,
    })
    let vm = new Vue({
        el: '#app',
        data: {

        },
        methods: {

        }
    });

    // 对于轮播图 swiper 里面可以放图片，文字。
</script>

</html>